﻿

<%namespace YouHP.Model%>
<%namespace YouHP.Model.Group%>

<%template _Header%>

<div class="layout2-cols2">
	
     <div class="col1">
		<%template _ProfileMenu%>
	</div>
	
	<div class="col2"> 

<div class="box">
	  <%template _ProfileHeader%> 


			<div class="content"  style="margin-top: 10px;">
			    
				<div class="news_list">
				    <%if UserData.Id==ProfileData.Id%>
               <%csharp%> TempUrl = "/User/LogAdd.aspx";<%/csharp%>
				<ul style="text-align:right;"><a href="{this.GetUrl(TempUrl)}"><font class="newlog">添加新日志</font></a></ul>
				    <%/if%>	  
<%if LogDataList.Count==0%>			
      <h2 style="padding:10px; text-align:center;">暂无日志</h2>
<%else%>      	    
				<%csharp%>foreach(LogTopicInfo item in LogDataList) { <%/csharp%>
                    <%if UserData.Id==item.HostUserId%>
	                    <div style="float:right;">

	                     <%csharp%> TempUrl = "/User/LogEdit.aspx?lid=" +item.Id;<%/csharp%>
                    	
	                    <span><a href="{this.GetUrl(TempUrl)}">编辑</a></span>&nbsp;&nbsp;
	                     <%csharp%> TempUrl = "/User/LogDel.aspx?lid=" +item.Id;<%/csharp%>
                    	 
	                    <span><a href="#" onclick="if(window.confirm('删除日志将同时删除该日志全部评论，确定删除？')) window.location.href='{this.GetUrl(TempUrl)}';">删除</a></span>
	                    </div>
	                    <div style="clear:both;"></div>
                    <%/if%>	
				<ul>
				    <li class="list_title">
				        <%csharp%>TempUrl=this.GetUrl("/Profile/Log.aspx?uid=" + item.HostUserId + "&lid=" + item.Id); <%/csharp%>
				        <a href="{TempUrl}">{item.Title}</a>&nbsp;
				        <%csharp%> TempUrl = item.PostTime.ToString("yyyy-MM-dd"); <%/csharp%>
				        ({TempUrl})
				    </li> 
                    <li class="text"> 				
				        <%csharp%> TempUrl = item.Body.Substring(0,Math.Min(item.Body.Length,500)); <%/csharp%>
				        {TempUrl} ......
				    </li>
				    <li class="opt">
				       <%csharp%>TempUrl=this.GetUrl("/Profile/Log.aspx?uid=" + item.HostUserId + "&lid=" + item.Id); <%/csharp%>				        
				       <span style="float:left;">&nbsp;&nbsp;<a href="{TempUrl}">点击查看全文</a></span>
				       <span style="float:right;">
				        <a href="{TempUrl}">阅读({item.Hits})</a>
				        &nbsp;&nbsp;
				        <%csharp%>TempUrl=this.GetUrl("/Profile/Log.aspx?uid=" + item.HostUserId + "&lid=" + item.Id); <%/csharp%>	
				        <a href="{TempUrl}">评论({item.ReplyCount})</a>
                       </span>
				    </li>
			    </ul>
    			<%csharp%>}<%/csharp%>
 <%/if%>   			
			    </div>
			    
			</div>
</div>

		<div class="box">
			<div class="content">
				<div class="pages">
					{PagingString}
				</div>
			</div>
		</div>
		
	</div>
	
</div>

<%template _footer%>		
